package com.shntec.temp.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class MySQLConn {

	private String host = "127.0.0.1";
	private String port = "3306";
	private String dbname = "temptask";
	private String user = "temptaskdba";
	private String pass = "temptaskdba";
	private String charset = "UTF-8";
	
	public Connection getConn() throws ClassNotFoundException, SQLException{
		
		Class.forName("com.mysql.jdbc.Driver");
		
		String url = "jdbc:mysql://"+host+":"+port+"/"+dbname+"?useUnicode=true&characterEncoding="+charset;
		
		return DriverManager.getConnection(url, user, pass);
		
	}
	
}
